package com.lhd.qd.module.system.hospital.model.converter;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhd.qd.module.system.hospital.model.dataobj.HospitalDO;
import com.lhd.qd.module.system.hospital.model.dto.HospitalSaveDTO;
import com.lhd.qd.module.system.hospital.model.vo.HospitalDetailVO;
import com.lhd.qd.module.system.hospital.model.vo.HospitalListVO;
import com.lhd.qd.module.system.hospital.model.vo.HospitalTreeVO;
import org.mapstruct.Mapper;
import org.mapstruct.Named;
import org.mapstruct.factory.Mappers;

@Mapper
public abstract class AbstractHospitalConverter {

    public static AbstractHospitalConverter INSTANCE = Mappers.getMapper(AbstractHospitalConverter.class);

    public abstract Page<HospitalListVO> doPage2ListVOPage(IPage<HospitalDO> doPage);

    public abstract HospitalDetailVO do2DetailVO(HospitalDO dataObj);

    public abstract HospitalDO saveDTO2DO(HospitalSaveDTO saveDTO);

    @Named("do2TreeVO")
    public abstract HospitalTreeVO do2TreeVO(HospitalDO dataObj);
}
